/* MonthStorageSearchEvent.java
 *
 * Project/Product: GWBS2009
 *
 * Modify Information:
 * =============================================================================
 *   Author	Date       Description
 *   ----------	---------- ---------------------------------------------------
 *   wzh	2010-5-12	First release
 *
 * Licensed Materials - Property of APEP
 * =============================================================================
 *    (C) COPYRIGHT Shanghai Auto Mart E-Procurement Co., Ltd. 2007 - 2010
 *    All Rights Reserved.
 *
 *    This software is the confidential and proprietary information of
 *    Shanghai Auto Mart E-Procurement Co., Ltd. ("Confidential Information").
 *    You shall not disclose such Confidential Information and shall use it only
 *    in accordance with the terms of the license agreement you entered into 
 *    with Shanghai Auto Mart E-Procurement Co., Ltd.
 *
 * Noties:
 * =============================================================================
 * 
 */

package system.base;

import framework.core.Conditions;
import framework.core.SearchEvent;

public class MonthStorageSearchEvent extends SearchEvent {
    
    private String [] warehouseCodes ;
    private String positionCode="";
    private String providerCode="";
    private String keeperStaffId="";
    private String balanceMode = "" ;
    
    public Conditions toConditions() throws Exception
    {
        Conditions c = super.toConditions();

      c.add(getCondition(InSub.POSITION_CODE,getPositionCode()));

      c.add(getCondition(InSub.PRODUCT_NAME,getProviderCode()));

       c.add(getCondition(InSub.PRODUCT_PRICE,getKeeperStaffId()));
       c.add(getCondition(InSub.BALANCE_MODE,getBalanceMode()));
       if (getWarehouseCodes() != null) {
           c.add(InHead.WAREHOUSE_CODE,Conditions.IN,getWarehouseCodes());
       }
         return c;
    }




    /**
     * @return the positionCode
     */
    public String getPositionCode() {
        return this.positionCode;
    }
    /**
     * @param aPositionCode the positionCode to set
     */
    public void setPositionCode(String aPositionCode) {
        this.positionCode = aPositionCode;
    }
    /**
     * @return the providerCode
     */
    public String getProviderCode() {
        return this.providerCode;
    }
    /**
     * @param aProviderCode the providerCode to set
     */
    public void setProviderCode(String aProviderCode) {
        this.providerCode = aProviderCode;
    }
    /**
     * @return the keeperStaffId
     */
    public String getKeeperStaffId() {
        return this.keeperStaffId;
    }
    /**
     * @param aKeeperStaffId the keeperStaffId to set
     */
    public void setKeeperStaffId(String aKeeperStaffId) {
        this.keeperStaffId = aKeeperStaffId;
    }

    /**
     * @return the balanceMode
     */
    public String getBalanceMode() {
        return this.balanceMode;
    }

    /**
     * @param aBalanceMode the balanceMode to set
     */
    public void setBalanceMode(String aBalanceMode) {
        this.balanceMode = aBalanceMode;
    }


    /**
     * @return the warehouseCodes
     */
    public String[] getWarehouseCodes() {
        return this.warehouseCodes;
    }


    /**
     * @param aWarehouseCodes the warehouseCodes to set
     */
    public void setWarehouseCodes(String[] aWarehouseCodes) {
        this.warehouseCodes = aWarehouseCodes;
    }

}
